package com.cy.dda.dao.mapper.goodsdiligencing;

import com.cy.dda.model.domain.goodsdiligencing.GoodsDiligencingReturnVisitReportAttachment;
import com.cy.dda.model.enums.goodsdiligencing.GoodsDiligencingAttachmentType;
import com.cy.dda.model.vo.goodsdiligencing.GoodsDiligencingReportAttachmentVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.BaseMapper;

import java.util.Date;
import java.util.List;

/**
 * @Description 回访报告图片mapper
 * @Author tanyilin
 * @Date 2019/8/26 15:47
 */
@Mapper
public interface GoodsDiligencingReturnVisitReportAttachmentMapper extends BaseMapper<GoodsDiligencingReturnVisitReportAttachment> {

    /**
     * 批量新增
     *
     * @param attachmentDoAddList
     */
    void insertBatch(@Param("attachmentDoAddList") List<GoodsDiligencingReturnVisitReportAttachment> attachmentDoAddList);

    /**
     * 根据更新时间，删除无效数据
     * @param returnVisitReportId
     * @param type
     * @param updateTime
     * @return void
     */
    void deleteByUpdateTimeAndType(@Param("returnVisitReportId") Long returnVisitReportId, @Param("type") GoodsDiligencingAttachmentType type, @Param("updateTime") Date updateTime);

    /**
     * 查询尽调报告-影音资料列表
     * @param returnVisitReportId
     * @param type
     * @return java.util.List<com.cy.dda.model.vo.diligencing.DiligencingReportAttachmentVO>
     */
    List<GoodsDiligencingReportAttachmentVO> selectReturnVisitReportAttachment(@Param("returnVisitReportId") Long returnVisitReportId, @Param("type") GoodsDiligencingAttachmentType type);

}
